package own.stu.jobgib.playown.juc.activeObject.request;

import own.stu.jobgib.playown.juc.activeObject.result.FutureResult;
import own.stu.jobgib.playown.juc.activeObject.result.Result;
import own.stu.jobgib.playown.juc.activeObject.service.Servant;

public class MakeStringRequest extends MethodRequest<String> {

    private final int count;
    private final char fillChar;

    public MakeStringRequest(Servant servant, FutureResult<String> future, int count, char fillChar) {
        super(servant, future);
        this.count = count;
        this.fillChar = fillChar;
    }

    @Override
    public void execute() {
        Result<String> resultV = servant.makeString(count, fillChar);
        result.setValue(resultV);
    }
}
